package com.xpffly.assist.controller;

import com.xpffly.assist.service.SendEmailService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: xpengfei
 * @Date: 2021/4/9 23:20
 * @Description：发送邮件的接口
 */
@RestController
public class SendEmailController {

    @Resource
    private SendEmailService sendEmailService;
    /**
     * 发送简单的文本邮件
     *
     * @param receiver 接收者
     * @param subject  邮件主题
     * @param content  邮件内容
     */
    @RequestMapping("sendText")
    public void sendTextEmail(String receiver, String subject, String content) {
        sendEmailService.sendTextEmail(receiver, subject, content);
    }

    @RequestMapping("text")
    public void sendTest(String receiver, String subject, String content) {
        System.out.println(receiver);
        System.out.println(subject);
        System.out.println(content);
    }

}
